package cn.IT.domain;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.apache.struts2.json.annotations.JSONFieldBridge;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user", catalog = "itsupport")
@JsonIgnoreProperties(value={"likes","replies","topicsForToUserId","topicsForUserId"})
public class User implements java.io.Serializable {

	// Fields

	private Integer userId;
	private String userName;
	private String password;
	private String professionalTitle;
	private String email;
	private String headUrl;
	private String location;
	private Integer topicCount;
	private Integer contributionCount;
	private Integer replyCount;
	private Integer enabled;

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String userName, String password, String professionalTitle, String email, String headUrl, String location, Integer topicCount,
			Integer replyCount, Integer enabled) {
		this.userName = userName;
		this.password = password;
		this.professionalTitle = professionalTitle;
		this.email = email;
		this.headUrl = headUrl;
		this.location = location;
		this.topicCount = topicCount;
		this.replyCount = replyCount;
		this.enabled = enabled;
	}
	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "userId", unique = true, nullable = false)

	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "userName", nullable = false)

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "password", nullable = false)

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "professionalTitle", nullable = false)
	public String getProfessionalTitle() {
		return this.professionalTitle;
	}

	public void setProfessionalTitle(String professionalTitle) {
		this.professionalTitle = professionalTitle;
	}

	@Column(name = "email", nullable = false)

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "headUrl", nullable = false)

	public String getHeadUrl() {
		return this.headUrl;
	}

	public void setHeadUrl(String headUrl) {
		this.headUrl = headUrl;
	}

	@Column(name = "topicCount", nullable = false)

	public Integer getTopicCount() {
		return this.topicCount;
	}

	public void setTopicCount(Integer topicCount) {
		this.topicCount = topicCount;
	}

	@Column(name = "replyCount", nullable = false)

	public Integer getReplyCount() {
		return this.replyCount;
	}

	public void setReplyCount(Integer replyCount) {
		this.replyCount = replyCount;
	}

	@Column(name = "enabled", nullable = false)

	public Integer getEnabled() {
		return this.enabled;
	}

	public void setEnabled(Integer enabled) {
		this.enabled = enabled;
	}
	
	@Column(name = "location", nullable = false)
	public String getLocation() {
		return this.location;
	}

	public void setLocation(String location) {
		this.location = location;
	}
	
	@Column(name = "contributionCount", nullable = false)
	public Integer getContributionCount() {
		return this.contributionCount;
	}

	public void setContributionCount(Integer contributionCount) {
		this.contributionCount = contributionCount;
	}

}